<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="x" uri="/WEB-INF/im.tld" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>金蝶协同 - 微门户设置</title>
	<link href="${ctx_path}/client/css/portal.css" type="text/css" rel="stylesheet">
	<style type="text/css">
		input.button {
			margin-top: 1px;
		    border: 1px solid;
		    height: 18px;
		    letter-spacing: 0.5em;
		    background-image: url('${ctx_path}/client/images/buttonbg.gif');
		    background-repeat: repeat-x;
		    background-position: top;
		}
	</style>
	<script type="text/javascript">
		function showPortalHome() {
			window.location.href = "${ctx_path}/ucstar.do?method=portal&t=${token}";
		}
	</script>
</head>
<body onContextMenu="return false">
	<c:if test="${not empty user}">
		<c:set var="url_home">${ctx_path}/login/kingdee_sso_login.jsp?DSESSIONID=${sessionid}&from=oahelper&nexturl=<x:urlencode url="/modules/portal/portalService.do?toPage=P1"/></c:set>
		<table border="0" style="font-size:13px; width:100%">
			<tbody>
				<tr>
					<td width="20px">
						<a title="金蝶协同首页" target="_blank" href="${url_home}"><img border="0" src="${ctx_path}/client/images/portal_home.png" /></a>
					</td>
					<td valign="center"><font style="font-weight:bold">金蝶协同</font></td>
					<td align="right" valign="center" style="padding-right:5px;">&nbsp;</td>
				</tr>
			</tbody>
		</table>
		<%-- <div style="margin:3px">${user.name}(${user_mask})</div> --%>
		<form style="margin-top:0px;margin-left:3px;" action="${ctx_path}/ucstar.do?method=save" method="post">
			<input type="hidden" name="userid" value="${user.id}" />
			<input type="hidden" name="token" value="<x:urlencode url="${token}"/>" />
			<c:if test="${x:combined(modules, 1)}">
				<input type="checkbox" name="portal" value="1" ${x:checked(user_mask, 1)} />协同审批<br/>
			</c:if>
			<c:if test="${x:combined(modules, 2)}">
				<input type="checkbox" name="portal" value="2" ${x:checked(user_mask, 2)} />协同工作<br/>
			</c:if>
			<c:if test="${x:combined(modules, 4)}">
				<input type="checkbox" name="portal" value="4" ${x:checked(user_mask, 4)} />知识中心<br/>
			</c:if>
			<c:if test="${x:combined(modules, 8)}">
				<input type="checkbox" name="portal" value="8" ${x:checked(user_mask, 8)} />通知公告<br/>
			</c:if>
			<c:if test="${x:combined(modules, 16)}">
				<input type="checkbox" name="portal" value="16" ${x:checked(user_mask, 16)} />新闻中心<br/>
			</c:if>
			<c:if test="${x:combined(modules, 32)}">
				<input type="checkbox" name="portal" value="32" ${x:checked(user_mask, 32)} />任务管理<br/>
			</c:if>
			<c:if test="${x:combined(modules, 64)}">
				<input type="checkbox" name="portal" value="64" ${x:checked(user_mask, 64)} />会议管理<br/>
			</c:if>
			<c:if test="${x:combined(modules, 128)}">
				<input type="checkbox" name="portal" value="128" ${x:checked(user_mask, 128)} />在线论坛<br/>
			</c:if>
			<c:if test="${x:combined(modules, 256)}">
				<input type="checkbox" name="portal" value="256" ${x:checked(user_mask, 256)} />问卷调查<br/>
			</c:if>
			<c:if test="${x:combined(modules, 512)}">
				<input type="checkbox" name="portal" value="512" ${x:checked(user_mask, 512)} />电子邮件<br/>
			</c:if>
			<input type="submit" class="button" value="保存" />
			<input type="button" class="button" value="取消" onclick="showPortalHome();" />
		</form>
	</c:if>
	<c:if test="${empty user}">
		无效用户<br/>
		<a style="margin-left:6px;" href="${ctx_path}/ucstar.do?method=portal&t=${token}">返回微门户首页</a>
	</c:if>
</body>
</html>